<template>
	<view class="order-table">
		<uni-table ref="table" :loading="loading" border stripe  emptyText="暂无更多数据">
			<uni-tr>
				<uni-th width="130" align="center">日期时间</uni-th>
				<uni-th width="100" align="center">姓名</uni-th>
				<uni-th align="center">地址</uni-th>
				<uni-th width="100" align="center">电话</uni-th>
			</uni-tr>
			<uni-tr v-for="(v, index) in orderList" :key="index">
				<uni-td align="center">{{ v.date }} {{ v.time }}</uni-td>
				<uni-td align="center">{{ v.name }}</uni-td>
				<uni-td align="center">{{ v.address }}</uni-td>
				<uni-td align="center">{{ v.phone }}</uni-td>
				<!-- <uni-td align="center">{{ v.time }}</uni-td>
				<uni-td align="center">{{v.sub.length>0?'已预约':'未预约'}}</uni-td>
				<uni-td align="center">{{ v.sub.length}}</uni-td>
				<uni-td align="center"></uni-td> -->
			</uni-tr>
		</uni-table>
								
	</view>
</template>

<script>
	import { GetOrderListById } from '../../api/index.js'
	export default {
		data() {
			return {
				orderList:[]
			};
		},
		onLoad(options){
			console.log(options)
			this.getOrderListById(options.id)
		},
		methods:{
			async getOrderListById(id){
				const { data:res } = await GetOrderListById(id)
				console.log(res,'f')
				this.orderList = res.data
			}
		}
	}
</script>

<style lang="scss">

</style>
